s1 = {1, 2, 3, 4, 5, 6, 6, 6, 6 }

# 移除 5
s1.remove(5)
print(s1)

# 插入一批
s1.update({7,8,9,10,11})

# 添加元素
s1.add(12)

print(s1)

# 交集
s2 = {5,6,7,8,9}
print(s1 & s2)

# 并集
print(s1 | s2)

# 统计得分的有多少人

score = [90,90,100,100,60,50,30,1,22,11,1,31,1]
scoreSet = set(score)
# 方式1
dict1 = {}
for i in score:
    if dict1.get(i):
        dict1[i] +=1
    else:
        dict1[i] = 1
print(dict1)

# 方式2
dict2 = {}
for i in scoreSet:
    dict2[i] = score.count(i)
print(dict2)